package cn.itlaobing.spring.web.tags;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

import cn.itlaobing.spring.vo.Pageable;

public class PaginationTag extends SimpleTagSupport {

	@SuppressWarnings("unused")
	private Pageable<?> pageable = null;

	public void setPageable(Pageable<?> pageable) {
		this.pageable = pageable;
	}

	@Override
	public void doTag() throws JspException, IOException {
		// 获取流
		JspWriter out = super.getJspContext().getOut();

		out.print("<ul class='pagination no-margin'><li class='disabled'><a href='#' data-original-title='' title=''>«</a></li><li class='active'><a href='#' data-original-title='' title=''>1</a></li><li><a href='#' data-original-title='' title=''>2</a></li><li><a href='#' data-original-title='' title=''>3</a></li><li><a href='#' data-original-title='' title=''>4</a></li><li><a href='#' data-original-title='' title=''>5</a></li><li><a href='#' data-original-title='' title=''>6</a></li><li><a href='#' data-original-title='' title=''>»</a></li></ul>");

	}

}
